<%@ page language="java" import="java.util.*" pageEncoding="utf-8"%>
<%@ taglib uri="/WEB-INF/c.tld" prefix="c"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
String pid = (String)request.getParameter("id");
int id=Integer.valueOf(pid);  
%>
<!DOCTYPE HTML>
<html>
<head>
<base href="<%=basePath%>">
<title>电子病历</title>
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=0">
<meta http-equiv="pragma" content="no-cache">
<meta http-equiv="cache-control" content="no-cache">
<meta http-equiv="expires" content="0">
<meta http-equiv="keywords" content="电子病历,keyword2,keyword3">
<meta http-equiv="description" content="This is my page">
<link rel="stylesheet" href="<%=basePath%>css/weui.css" />
<link rel="stylesheet" href="<%=basePath%>css/example.css" />
<script type="text/javascript" src="<%=basePath%>js/jquery.min.js"></script>
<script type="text/javascript" src="<%=basePath%>js/jquery.js"></script>

</head>
<script type="text/javascript">
var basePath="<%=basePath%>";
var id=<%=id%>
$(document).ready(function(){
   var menstrualHistory=$("#menstrualHistory").val();
   if(menstrualHistory!=""){
   $("#yuejing").show();
   }
   $.ajax({
         url: basePath+"diseaseHistory/toViewImgCaseDetail.spring",
         data: {
         	id : id
         },
         type: "POST",
         dataType: 'json',
         cache: false,
         success: function (ret) {
             if(ret!=null){
             var html="";
             	if(ret.list!=null&&ret.list.length>0){
             		$("#content").append("");
             	for(var i=0;i<ret.list.length;i++){
             	var data=ret.list[i];
             	if(i==0){
             	html+="<div class=\"weui_cell\">";
             	html+="<div class=\"weui_cell_hd\"><label for=\"profession\" class=\"weui_label\" style=\"width:8em\">病历名称: </label></div>";
             	html+=" <div class=\"weui_cell_bd weui_cell_primary\">";
             	html+="<input class=\"weui_input\" type=\"text\" name=\"profession\" disabled=\"disabled\" value='"+data.historyName+"'>";
             	html+="</div></div>";
             	html+=" <div class=\"weui_cell\" id=\"us\">";
             	html+=" <div class=\"weui_cell_hd\"><label for=\"profession\" class=\"weui_label\" style=\"width:8em\">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</label></div> ";
             	html+="<div class=\"weui_cell_bd weui_cell_primary\">";
             	html+=" <input class=\"weui_input\" type=\"text\" name=\"username\" disabled=\"disabled\" value='"+data.username+"'> ";
             	html+="</div></div>"
             	html+="<div id=\"img\" style=\"text-align: center;\" class=\"weui_article\">";
             	html+=" <img  src='"+data.url+"' width=\"100%\" >";
             	html+="</div> ";
             	}else{
             	html+="<div id=\"img\" style=\"text-align: center;\" class=\"weui_article\">";
             	html+=" <img  src='"+data.url+"' width=\"100%\" >";
             	html+="</div> ";
             	}
             	}
             	$("#content").append(html);
             
             	}
             }
         }
     });
});

function backList(){
	 url=basePath+"jsp/caseHistory/caseHistoryList.jsp";
		 window.location.href=url;
}
</script>
<body ontouchstart>
<div class="container js_container">
</div>
<form action="" name="form" id="form">
<div class="page">
    <div class="bd" id="content">
<!--    	<c:forEach items="${bean }" var="list" varStatus="index"> -->
<!--    	<c:if test="${index.index==0 }"> -->
<!-- 			<div class="weui_cell"> -->
<!--                 <div class="weui_cell_hd"><label for="profession" class="weui_label" style="width:8em">病历名称: </label></div> -->
<!--                 <div class="weui_cell_bd weui_cell_primary"> -->
<!--                     <input class="weui_input" type="text" name="profession" disabled="disabled" value="${list.historyName}"> -->
<!--                 </div> -->
<!--             </div> -->
            
<!--             <div class="weui_cell" id="us"> -->
<!--                 <div class="weui_cell_hd"><label for="profession" class="weui_label" style="width:8em">姓&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;名:</label></div> -->
<!--                 <div class="weui_cell_bd weui_cell_primary"> -->
<!--                     <input class="weui_input" type="text" name="username" disabled="disabled" value="${list.username}"> -->
<!--                 </div> -->
<!--             </div> -->
<!--             </c:if> -->
<!--             <div id="img" style="text-align: center;" class="weui_article"> -->
<!--               <img alt="" src="${list.url}" width="100%" >  -->
<!--             </div> -->
<!--           </c:forEach> -->
          
    </div>
</div>
<div class="weui_extra_area">
           <a class="weui_btn weui_btn_primary" href="javascript:" id="showTooltips" onclick="backList();">返回</a>
        </div>
	</form>
</body>
</html>
